package com.peng.service.impl;

import com.peng.dao.ProductDao;
import com.peng.entity.Product;
import com.peng.service.IProductService;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl implements IProductService {
    private final ProductDao productDao;

    public ProductServiceImpl(ProductDao productDao) {
        this.productDao = productDao;
    }
    @Override
    public Product findByPid(Long pid) {
        return productDao.findById(pid).get();
    }
}
